Signals received from other circuits, whether those circuits are analog or digital in design, often contain a noise signal such as a noise spike, which is often referred to as a “glitch” in the signal. These glitches can cause improper responses from the receiving circuit and therefore require removal by a deglitching circuit. For example, if the input to the circuit is the keyboard of a personal computer, the closing of the keyboard switch may cause the switch to bounce repeatedly producing what appears to be a multiple signals from that key. A deglitch circuit will remove the erroneous signals so that only a single key stroke will be recognized. Deglitching circuits can operate on a single edge of the (pulse) signal or on both edges of the signal. One way to form a two-edge deglitch circuit is to cascade two single edge deglitch circuits. Although this produces the required two edge deglitch function, it also involves redundancy of components and therefore a larger circuit. A single integrated circuit could have, for example, forty (40) separate input signals , twenty-five (25) of which require two edge deglitching and fifteen (15) of which require only single edge deglitching. Thus, the duplication of circuitry involved in the cascaded design takes up a significant portion of the circuit area of the integrated circuit which increases the cost and reduces the yield of the device.
Another way to make a deglitch circuit is to use a state machine. A state machine deglitch circuit can be one of two types. The first type requires that the input signal be synchronized with the clock for the state machine. In this type of design, a glitch which is less than the clock period is ignored. In a second type of state machine, the input signal is not synchronized with the clock. In this design, if the input signal changes at the same time the clock changes, the state machine can enter a metastabile state of operation and the state machine may yield incorrect functionality. Accordingly, there is a need for a small two edge deglitch circuit having a small gate count at which takes up a small area on an integrated circuit.